﻿using UnityEngine;

public class TimeDispose : Entity, IUpdate, IAwake<int>
{
    float disposeTime;
    void IAwake<int>.Awake(int time)
    {
        disposeTime = Time.time + (time / 1000f);
    }

    void IUpdate.Update()
    {
        if (Time.time >= disposeTime)
            Parent.Dispose();
    }
}
